package com.example.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/plus")
public class PlusController {


    @RequestMapping(value = "/add", method = RequestMethod.GET)
    public Integer doAdd(@RequestParam("a") Integer a, @RequestParam("a") Integer b) {
        Integer c = a + b;
        log.info("/add,  sum:" + c);
        return c;
    }
}